module ActionExtension
  module Presenters
    class Base
      def initialize(object, template)
        @object = object
        @template = template
      end

      private

      def self.presents(name)
        define_method(name) do
          @object
        end
      end

      def template
        @template
      end

      def method_missing(*args, &block)
        @template.send(*args, &block)
      end
    end
  end
end
